<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" href='<spring:url value="/resources/css/jquery-ui-1.10.4.custom.css"></spring:url>'>
    <link rel="stylesheet" href='<spring:url value="/resources/css/validationEngine.jquery.css"></spring:url>'/>
    <link rel="stylesheet" href='<spring:url value="/resources/css/template.css"></spring:url>'/>
    <link rel="stylesheet" href='<spring:url value="/resources/css/smartpaginator.css"></spring:url>'>
    <link rel="stylesheet" href='<spring:url value="/resources/css/middle.css"></spring:url>'>
    <link rel="stylesheet" href='<spring:url value="/resources/css/common.css"></spring:url>'>
    <script src='<spring:url value="/resources/js/jquery-1.11.0.js"></spring:url>'></script>
    <script src='<spring:url value="/resources/js/jquery-ui-1.10.4.custom.js" ></spring:url>'></script>
    <script src='<spring:url value="/resources/js/smartpaginator.js" ></spring:url>'></script>
    <script src='<spring:url value="/resources/js/common.js"></spring:url>'></script>
    <script type="text/javascript">
        $(function () {
            var height = $(window).height() - 240 - 40 - 60 - 35 - 37;
            $("#divQuery").css("height", height + "px");
            var page = ${page};
            $("#dataTable").initDataTable();
            $('#green').smartpaginator({
                totalrecords: page,
                recordsperpage: 10,
                datacontainer: 'dataTable',
                dataelement: 'tr',
                initval: 0,
                next: 'Next',
                prev: 'Prev',
                first: 'First',
                last: 'Last',
                theme: 'green'
            });
            $("#btnQuery").click(function () {
                $("#frmOperate").attr("action", "/foc/user/conferencequery/load");
                $("#frmOperate").submit();
            });
            $("#calendarControl").datetimepicker({
                title: "选择日期",
                width: 350,
                height: 250,
                modal: true
            });
            $("#queryDate").click(function () {
                var text = $("#queryDate").val();
                $("#calendarControl").openDatetimepicker({obj: $("#queryDate"), text: text});
            });
        });
    </script>
</head>
<body>
<div>
    <form id="frmOperate" action="/cms/user/conferencequery/load" method="post">

        <table id="queryTable1" style="width: 100%;height: 60px " cellpadding="0" cellspacing="0">
            <tr>
                <td align="right" width="8%">会议时间:</td>
                <td align="left" width="15%">
                    <input type="text" style="width:80%" id="queryDate" name="queryDate"
                           value='<c:if test="${queryParam.queryDate != null}">${queryParam.queryDate}</c:if>'/>
                </td>
                <td align="right" width="8%">会议名称:</td>
                <td align="left" width="15%">
                    <input style="width: 80%" type="text" name="meetingName"
                           value='<c:if test="${queryParam.meetingName != null}">${queryParam.meetingName}</c:if>'/>
                </td>
                <td align="right" width="8%">会议室:</td>
                <td align="left" width="15%">
                    <select name="boardroom.id" style="width:80%">
                        <option value="0">--</option>
                        <c:forEach var="boardroom" items="${boardrooms}">
                            <option
                                    <c:if test="${queryParam.boardroom.id == boardroom.id}">selected="selected"</c:if>
                                    value="${boardroom.id}">${boardroom.boardroomName}</option>
                        </c:forEach>
                    </select></td>
                <td align="center" rowspan="2" width="15%" style="border-right: #808080 solid 1px;">
                </td>
                <td align="center" rowspan="2" width="15%">
                    <a id="btnQuery" href="#"><img
                            src='<spring:url value="/resources/images/admin/check.png" ></spring:url>' border="0"/></a>
                </td>
            </tr>
            <tr>

                <td align="right">重要级别:</td>
                <td align="left">
                    <select name="flag" style="width: 80%">
                        <option value="">--</option>
                        <option
                                <c:if test="${queryParam.flag =='0'}">selected="selected"</c:if> value="0">普通
                        </option>
                        <option
                                <c:if test="${queryParam.flag =='1'}">selected="selected"</c:if> value="1">重要
                        </option>
                    </select>
                </td>
                <td align="right">会议密级:</td>
                <td align="left">
                    <select name="secretLevel" style="width: 80%">
                        <option value="">--</option>
                        <option
                                <c:if test="${queryParam.secretLevel =='0'}">selected="selected"</c:if> value="0">未涉密
                        </option>
                        <option
                                <c:if test="${queryParam.secretLevel =='1'}">selected="selected"</c:if> value="1">涉密
                        </option>
                    </select>
                </td>
                <!--
	<td align="right" >状态:</td><td align="left" >
					<select name="status" style="width: 80%">
					<option value="">--</option>
					<option <c:if test="${queryParam.status == '-1'}">selected="selected"</c:if> value="-1">已超时</option>
					<option <c:if test="${queryParam.status == '0'}">selected="selected"</c:if> value="0">预定中</option>
					<option <c:if test="${queryParam.status == '1' || queryParam.status == '3'}">selected="selected"</c:if> value="1">已预订</option>
					<option <c:if test="${queryParam.status == '2' || queryParam.status == '4'}">selected="selected"</c:if> value="2">已审批</option>
					<option <c:if test="${queryParam.status == '5'}">selected="selected"</c:if> value="5">已取消</option>
					<option <c:if test="${queryParam.status == '6'}">selected="selected"</c:if> value="6">已结束</option>
					</select>
				</td>
-->
            </tr>
        </table>

    </form>
</div>
<div style="background-color: #434445" align="right">
    <table style="width: 100% ">
        <tr>
            <td align="left" height="35px"><font color="#ffffff" style="font-family: '宋体'">查询结果</font></td>
        </tr>
    </table>
</div>
<div id="divQuery" style="overflow-y:auto;">
    <table id="dataTable" cellpadding="0" cellspacing="0" style="width: 100%;">
        <tr>
            <th height="25px" width="15%">会议时间</th>
            <th width="18%">会议名称</th>
            <th width="14%">会议室</th>
            <th width="18%">所属项目</th>
            <!-- <th width="5%">等级</th> -->
            <th width="5%">密级</th>
            <th width="5%">人数</th>
            <th width="5%">发起人</th>
            <th width="5%">主持人</th>
            <th width="5%">级别</th>
            <th width="5%">状态</th>
        </tr>
        <c:forEach var="conference" items="${ list }">
        <tr class="middle_2_bottom_table_1">
            <td align="center">${conference.confTime}</td>
            <td align="center">${conference.meetingName}</td>
            <td align="center">${conference.boardroom.boardroomName}</td>
            <td align="center">${conference.project.projectName}</td>
            <!--  <td align="center">${conference.meetingLevel}</td> -->
            <td align="center"><c:if test="${conference.secretLevel =='0'}" var="result">未涉密</c:if><c:if
                    test="${!result}">涉密</c:if></td>
            <td align="center">${conference.stafferCount}</td>
            <td align="center">${conference.originator.stafferName}</td>
            <td align="center">${conference.moderator.stafferName}</td>
            <td align="center">${conference.flag}</td>
            <c:if test="${conference.status == '-1'}">
            <td align="center">已超时</td>
            </c:if>
            <c:if test="${conference.status == '0'}">
            <td align="center">预定中</td>
            </c:if>
            <c:if test="${conference.status == '1' || conference.status == '3'}">
            <td align="center">已预订</td>
            </c:if>
            <c:if test="${(conference.status == '2' || conference.status == '4') && (conference.stafferStatus == '0' )}">
            <td align="center">已审批</td>
            </c:if>
            <c:if test="${(conference.status == '2' || conference.status == '4') && (conference.stafferStatus == '1' )}">
            <td align="center">未接受</td>
            </c:if>
            <c:if test="${(conference.status == '2' || conference.status == '4') && conference.stafferStatus == '2' }">
            <td align="center">已接受</td>
            </c:if>
            <c:if test="${(conference.status == '2' || conference.status == '4') && conference.stafferStatus == '3' }">
            <td align="center">已拒绝</td>
            </c:if>
            <c:if test="${(conference.status == '2' || conference.status == '4') && conference.stafferStatus == '4' }">
            <td align="center">已代替</td>
            </c:if>
            <c:if test="${conference.status == '5' }">
            <td align="center">已取消</td>
            </c:if>
            <c:if test="${conference.status == '6' }">
            <td align="center">已结束</td>
            </c:if>
            </c:forEach>
    </table>
</div>
<div id="green" style="margin: auto; width: 99%"></div>
<div id="calendarControl"></div>
</body>
</html>
